<style>
label{
	width:auto;
	padding-top:7px;
	display:block;
	float:left;
	text-align:right;
}
form.area1{
	width:815px;
	padding:3px;
	float:left;
}
form.area1 fieldset{
	float:left;
	border:1px solid #aaa;
}
input#filter_btn,
input#clear_btn{
	margin:5px 0px;
}
.area img{
	margin-right:20px;
}
table tr.head td{
	background:#2577BA;
	color:#fff;
	font-weight:bolder;
	text-align:center;
}
table tr:hover{
	background:#fff;
}
table tr td{
	border-right:1px solid #aaa;
	border-bottom:1px solid #aaa;
	padding:3px 5px;
	vertical-align:top;
}
table tr td:first-child{
	border-left:1px solid #aaa;
}
div#filter_status{
	font-size:10px;
	margin:0px 10px;
	float:left;
	color:#aaa;
}
table td a#deleteItem{
	width:12px;
	height:12px;
	position:relative;
	font-size:9px;
	top:-8px;
	left:-2px;
	margin:0px 0px -5px 0px;
	text-decoration:none;
	color:#F00;
	background:none;
	overflow:hidden;
}
table tr:hover td a#deleteItem{
	background:none;
}
table td a#deleteItem img{
	-moz-opacity:0.2;
}
table tr:hover td a#deleteItem img{
	-moz-opacity:1;
}
ul.pages{
	float:left;
	width:796px;
	list-style-type:none;
	margin:0px 0px 0px 2px;
	padding:5px 10px;
	
	background:#EFECB3;
	border-top:none;
	border-right:1px solid #848263;
	border-bottom:none;
	border-left:1px solid #848263;
}
ul.pages li{
	margin:0px;
	padding:0px;
	display:block;
	float:left;
}
ul.pages li a{
	display:block;
	padding:2px 5px;
	
	color:#ffffff;
	text-decoration:none;
}
ul.pages li#current a{
	background:#2577BA;
	color:#fff;
	text-decoration:none;
}
</style>
<h1>Ulaz materijala</h1>
<form method="post" action="javascript:void(0)" onsubmit="filterReport(document.getElementById('filter_btn'),5)" class="area1">
  <fieldset>
  	<legend>Datum ulaza ugovora</legend>
	<label for="start_date_ugovor">OD:</label><input maxlength="10" name="start_date_ugovor" type="text" id="start_date_ugovor" value="{{$start_ugo}}" rule="^(\d{2}\.\d{2}\.\d{4}){0,1}$" />
	<img src="gui/icon_datepicker.gif" class="datePicker" title="Odaberi datum" onClick="displayDatePicker('start_date_ugovor',this)" /><br clear="all" />
	<label for="end_date_ugovor">DO:</label><input maxlength="10" name="end_date_ugovor" type="text" id="end_date_ugovor" value="{{$end_ugo}}" rule="^(\d{2}\.\d{2}\.\d{4}){0,1}$" />
	<img src="gui/icon_datepicker.gif" class="datePicker" title="Odaberi datum" onClick="displayDatePicker('end_date_ugovor',this)" />
  </fieldset>
  <fieldset>
    <legend>Datum ulaza materijala:</legend>
	<label for="start_date">OD:</label><input maxlength="10" name="start_date" type="text" id="start_date" value="{{$start}}" rule="^(\d{2}\.\d{2}\.\d{4}){0,1}$" />
	<img src="gui/icon_datepicker.gif" class="datePicker" title="Odaberi datum" onClick="displayDatePicker('start_date',this)" /><br clear="all" />
	<label for="end_date">DO:</label><input maxlength="10" name="end_date" type="text" id="end_date" value="{{$end}}" rule="^(\d{2}\.\d{2}\.\d{4}){0,1}$" />
	<img src="gui/icon_datepicker.gif" class="datePicker" title="Odaberi datum" onClick="displayDatePicker('end_date',this)" />
  </fieldset>
  <div style="float:left;">
	<div style="float:left;">
		<label style="width:80px;" for="filter_komitent">Komitent:</label><input type="text" value="{{$kom}}" name="filter_komitent" id="filter_komitent" /><br clear="all" />
		<label style="width:80px;" for="filter_br_ugo">Broj ugovora:</label><input value="{{$br_ug}}" type="text" maxlength="6" name="filter_br_ugo" id="filter_br_ugo" /><br clear="all" />
		<label style="width:80px;" for="filter_radnik">Radnik:</label><input value="{{$rad}}" rule="^[^\d]{0,}$" type="text" name="filter_radnik" id="filter_radnik" /><br clear="all" />
	</div>
	<div style="float:left;">
		<label style="width:60px;" for="filter_potpun">Potpun:</label>
		<select name="filter_potpun" id="filter_potpun">
			<option value="0"></option>
			<option value="1" {{$sel_potpun_0}}>ne</option>
			<option value="2" {{$sel_potpun_1}}>da</option>
		</select><br clear="all" />
		<label style="width:60px;" for="filter_tip">Tip ulaza:</label>
		<select name="filter_tip" id="filter_tip">
			<option value="0"></option>
			<option {{$sel_tip_0}}>ulaz</option>
			<option {{$sel_tip_1}}>e-mail</option>
		</select>
	</div>
	<div style="float:left; margin-left:10px;">
		<input id="clear_btn" type="button" onClick="clearFilter(this,'filter_btn')" value="CLEAR" /><br clear="all" />
		<input id="filter_btn" type="submit" value="FILTER" />
	</div>
  </div>
</form><br clear="all" />
<ul class="pages" {{$nodisplay}}>
<li style="padding:2px 5px 0px 0px; font-weight:bolder;">STRANA [{{$numpages}}]: </li>
{{$before}}
{{%loop start page}}
<li {{$current}}><a href="javascript:void(0)" onclick="filterReport(document.getElementById('filter_btn'),5,{{$page}})">{{$page}}</a></li>
{{%loop end}}
{{$after}}
</ul>
<div class="area" style="clear:both">
{{$start_comment}}
<table class="report" width="800">
  <tr class="head">
  	<td colspan="5">UGOVOR</td>
    <td colspan="4">MATERIJAL</td>
  </tr>
  <tr class="head">
    <td>broj</td>
    <td>datum ulaza</td>
    <td>radnik</td>
    <td>komitent</td>
    <td>artikl</td>
    <td>datum ulaza </td>
    <td>poreklo</td>
    <td>potpun</td>
    <td>napomena</td>
  </tr>
  {{%loop start id}}
  <tr>
    <td>{{$br_ugo}}</td>
    <td>{{$dat_ugo}}</td>
    <td>{{$radnik}}</td>
    <td>{{$komitent}}</td>
    <td>{{$artikl}}</td>
    <td>{{$datum_mat}}</td>
    <td>{{$poreklo}}</td>
    <td style="text-align:center; vertical-align:middle;">{{$potpun}}</td>
    <td>{{$napomena}}</td>
  </tr>
  {{%loop end}}
</table>
{{$end_comment}}
</div>